import store from '@/store'
export const imgerror = {
  // dom元素插入时触发
  inserted(dom, bingding, vNode) {
    // 图片加载失败触发img的error事件，触发后让他替换为默认图片
    dom.onerror = function() {
      // 更换图片
      dom.src = bingding.value
    }
  }
}

export const permission = {
  inserted(dom, bingding, vNode) {
    if (!store.getters.points.includes(bingding.value)) {
      // dom.remove()
      dom.style.display = 'none'
    }
  }
}
